import request from "@/utils/request";

// 客户档案-客户列表分页
export function getStoreRoom(query) {
  return request({
    url: "/store/room/getList",
    method: "get",
    params: query,
  });
}

// 客户档案-客户列表分页
export function getRoomSettingList(query) {
  return request({
    url: "/store/room-setting/getList",
    method: "get",
    params: query,
  });
}

// 根据房间标识查询订单
export function getOrderbyRoom(query) {
  return request({
    url: "/order/get/byRoom",
    method: "get",
    params: query,
  });
}

// 获得门店员工
export function getStoreUser(data) {
  return request({
    url: "/order/store/user",
    method: "post",
    data: data,
  });
}

// 获得排班员工
export function getShiftRecordUser(query) {
  return request({
    url: "store/shift-record/getStoreUsers",
    method: "get",
    params: query,
  });
}

// 开房
export function roomOrderCreate(query) {
  return request({
    url: "/order/create",
    method: "POST",
    data: query,
  });
}

// 获取全部项目
export function itemAllList(query) {
  return request({
    url: "/store/item/listAll",
    method: "get",
    params: query,
  });
}
// 获取全部商品 /store/product/list

export function getProductList(query) {
  return request({
    url: "/store/product/page",
    method: "get",
    params: query,
  });
}

// 新增消费
export function orderCreateServer(query) {
  return request({
    url: "/order/create/server",
    method: "POST",
    data: query,
  });
}

export function getbyOrderId(query) {
  return request({
    url: "/order/get/byOrderId",
    method: "get",
    params: query,
  });
}

// 上钟/下种
export function upDown(query) {
  return request({
    url: "/order/clock/upDown",
    method: "POST",
    data: query,
  });
}

// 退钟
export function orderClockBack(query) {
  return request({
    url: "/order/clock/back",
    method: "POST",
    data: query,
  });
}

// 撤销下钟
export function orderClockCancel(query) {
  return request({
    url: "/order/clock/cancel",
    method: "POST",
    data: query,
  });
}

// 换项目
export function editServeItem(query) {
  return request({
    url: "/order/server/edit/item",
    method: "POST",
    data: query,
  });
}

// 换技师
export function editServeUser(query) {
  return request({
    url: "/order/server/edit/user",
    method: "POST",
    data: query,
  });
}

// 修改项目时长
export function editItemTime(query) {
  return request({
    url: "/order/server/edit/item/time",
    method: "POST",
    data: query,
  });
}

// 根据项目id获得次卡管理列表
export function getMinorCardListByItemId(query) {
  return request({
    url: "/store/minor-card/getMinorCardListByItemId",
    method: "get",
    params: query,
  });
}

// 结账

export function orderPay(query) {
  return request({
    url: "/order/pay",
    method: "POST",
    data: query,
  });
}

// 客户列表
export function clientList(query) {
  return request({
    url: "customer/member/page",
    method: "get",
    params: query,
  });
}

// 关联客户 /admin-api

export function orderCustom(query) {
  return request({
    url: "/order/custom",
    method: "POST",
    data: query,
  });
}

// 获得客户来源列表
export function getClientSourceList(query) {
  return request({
    url: "/customer/source/list",
    method: "get",
    params: query,
  });
}

// 客户档案-新增客户
export function CreateClient(data) {
  return request({
    url: "/customer/member/create",
    method: "post",
    data: data,
  });
}

// 办卡充值
export function CreateCard(data) {
  return request({
    url: "/customer/card/create",
    method: "post",
    data: data,
  });
}

// 赠送金金额
export function getGiveMoney(query) {
  return request({
    url: "/customer/card/getGiveMoney",
    method: "get",
    params: query,
  });
}

// 客户余额信息
export function clientTotalAmount(query) {
  return request({
    url: "/customer/card/getCardsMoney", //"/customer/total-amount/get",
    method: "get",
    params: query,
  });
}

// 退房
export function orderClose(query) {
  return request({
    url: "/order/close",
    method: "get",
    params: query,
  });
}

// 打扫
export function orderSweepm(query) {
  return request({
    url: "/order/sweep",
    method: "POST",
    data: query,
  });
}

// 获得会员卡列表
export function getMemberCard(query) {
  return request({
    url: "/customer/card/list",
    method: "get",
    params: query,
  });
}

// 合房
export function orderMerge(query) {
  return request({
    url: "/order/merge",
    method: "POST",
    data: query,
  });
}

// 换房
export function orderExchangeRoom(query) {
  return request({
    url: "/order/exchange/room",
    method: "POST",
    data: query,
  });
}

// 拆房
export function orderSplit(query) {
  return request({
    url: "/order/split",
    method: "POST",
    data: query,
  });
}

// 解冻
export function cardUpdateThaw(query) {
  return request({
    url: "/customer/card/updateThaw",
    method: "POST",
    params: query,
  });
}

// 房间状态统计信息
export function RoomTotal(query) {
  return request({
    url: "/store/room/total",
    method: "POST",
    data: query,
  });
}

// 获得允许联房房间
export function mergePermit(query) {
  return request({
    url: "/order/merge/permit",
    method: "POST",
    data: query,
  });
}

// 查询可转账服务
export function getTransfeServer(data) {
  return request({
    url: "/order/room/transfer/server",
    method: "POST",
    data: data,
  });
}

// 房间转账
export function getRoomTransfe(data) {
  return request({
    url: "/order/room/transfer",
    method: "POST",
    data: data,
  });
}

// 获得允许拆房房间
export function getSplitRoom(query) {
  return request({
    url: "/order/split/permit",
    method: "POST",
    params: query,
  });
}

// 获取当前排班信息
export function getShiftLoopToday(query) {
  return request({
    url: "/store/shift-loop/getShiftLoopToday",
    method: "POST",
    params: query,
  });
}

// 指定用户调整到当前班次最后
export function updateShift(query) {
  return request({
    url: "/store/shift-loop/update",
    method: "put",
    params: query,
  });
}

// 更新技师接单循环
export function updateList(data) {
  return request({
    url: "/store/shift-loop/updateList",
    method: "put",
    data: data,
  });
}

// 客户档案-根据手机号或会员卡号查询客户使用会员卡
export function getMemberCardInfo(query) {
  return request({
    url: "/customer/member/get/keyWord",
    method: "get",
    params: query,
  });
}


// /查询字典下拉框
export function getSelectData(query) {
  return request({
    url: "/system/dict-data/drop/down/",
    method: "get",
    params: query,
  });
}


// 客户档案-根据手机号或会员卡号查询可用会员卡
export function getCanMemberCard(query) {
  return request({
    url: "/customer/card/cust/cardNo/order",
    method: "get",
    params: query,
  });
}


export function getCardType(query) {
  return request({
    url: "store/mark-channel/all",
    method: "get",
    params: query,
  });
}